package com.ccsoft.netty.chatroom;

import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

/**
 * @author chanchaw
 * @create 2022-07-18 15:50
 */
public class ClientHandler extends SimpleChannelInboundHandler<String> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, String s) throws Exception {
        Channel channel = ctx.channel();
//        System.out.println("从服务端[" + channel.remoteAddress() + "]接受到的消息：" + s);
        System.out.println(s);
    }
}
